import 'package:flutter_test/flutter_test.dart';
import 'package:dict_page_view_plugin/dict_page_view_plugin.dart';
import 'package:dict_page_view_plugin/dict_page_view_plugin_platform_interface.dart';
import 'package:dict_page_view_plugin/dict_page_view_plugin_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockDictPageViewPluginPlatform
    with MockPlatformInterfaceMixin
    implements DictPageViewPluginPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final DictPageViewPluginPlatform initialPlatform = DictPageViewPluginPlatform.instance;

  test('$MethodChannelDictPageViewPlugin is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelDictPageViewPlugin>());
  });

  test('getPlatformVersion', () async {
    DictPageViewPlugin dictPageViewPlugin = DictPageViewPlugin();
    MockDictPageViewPluginPlatform fakePlatform = MockDictPageViewPluginPlatform();
    DictPageViewPluginPlatform.instance = fakePlatform;

    expect(await dictPageViewPlugin.getPlatformVersion(), '42');
  });
}
